/**
 * 版权所有:版权所有(C) 2020，卓信科技
 * 系统名称:FOL-财务在线
 * 文件名称:GridParamBean.java
 * 模块名称:TODO(这里请补充模块名称)
 * 创建日期:2020年5月19日
 * 作        者:Baisong
 * 内容摘要:TODO(简单的名值对对象)
 */
package com.zx.platform.syscontext.vo;

import java.io.Serializable;

/**
 * 类  名  称:GridParamBean
 * 
 * 内容摘要:TODO()
 * 
 * 作        者:Baisong
 */
public class GridParamBean implements Serializable 
{

	private static final long serialVersionUID = -6476028157427929330L;

	// 每页显示的行数
	private int pagesize = 0; 
	// 显示第几页
	private int page = 0; 
	private String sortname = "";
	private String sortorder = "asc";
	private int rows = 0;
	
	/**
	 * This is a method and must add annotation.
	 */
	public int getOffset()
	{
	    int offset = (page - 1) * pagesize;
	    offset = offset > 0 ? offset : 0;
	    return offset;
	}

	/**
	 * This is a method and must add annotation.
	 */
	public int getPagesize() 
	{
		return pagesize > 0 ? pagesize : 10;
	}

	/**
	 * This is a method and must add annotation.
	 */
	public void setPagesize(int pagesize) 
	{
		this.pagesize = pagesize;
	}

	/**
	 * This is a method and must add annotation.
	 */
	public int getPage() 
	{
		return page;
	}

	/**
	 * This is a method and must add annotation.
	 */
	public void setPage(int page) 
	{
		this.page = page;
	}

	/**
	 * This is a method and must add annotation.
	 */
	public String getSortname() 
	{
		return sortname;
	}

	/**
	 * This is a method and must add annotation.
	 */
	public void setSortname(String sortname) 
	{
		this.sortname = sortname;
	}

	/**
	 * This is a method and must add annotation.
	 */
	public String getSortorder() 
	{
		return sortorder;
	}

	/**
	 * This is a method and must add annotation.
	 */
	public void setSortorder(String sortorder) 
	{
		this.sortorder = sortorder;
	}

	/**
	 * This is a method and must add annotation.
	 */
	public int getRows() 
	{
		return rows;
	}

	/**
	 * This is a method and must add annotation.
	 */
	public void setRows(int rows) 
	{
		this.rows = rows;
		this.pagesize=rows;
	}

}
